/**
 * Created by ybjaa on 2017/3/31.
 */
import { NgModule }             from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {LoginComponent} from "./login.component"
import {UserLoginAuthService} from "./user-login-auth.service";
import {LogoutComponent} from "./logout.component"
import {TestComponent} from "./test/test.component";

const routes: Routes = [
    { path: "", redirectTo: '/manage', pathMatch: 'full' },
    { path: 'login',  component: LoginComponent,canActivate:[UserLoginAuthService] },
    { path: 'logout',  component:LogoutComponent },
    { path: 'test',  component:TestComponent }
];
@NgModule({
    imports: [ RouterModule.forRoot(routes) ],
    exports: [ RouterModule ]
})
export class AppRoutingModule {}
